<HTML><HEAD><TITLE>deletemin(?Var, +List, -Rest)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>deletemin(?Var, +List, -Rest)</H1>
Select from List the variable Var which has the smallest lower domain bound,
and return the rest of the list.


<DL>
<DT><EM>-Var</EM></DT>
<DD>A variable.
</DD>
<DT><EM>-Rest</EM></DT>
<DD>A term unifying with a list of domain variables or integers.
</DD>
<DT><EM>+List</EM></DT>
<DD>A list of domain variables or integers.
</DD>
</DL>
<H2>Description</H2>
   This predicate is used in labeling procedures.  Especially when labeling
   start times in scheduling problems, it is often a good strategy to start
   with the earliest possible tasks, because fixing those will cause useful
   bounds propagation on the start times of the other tasks. This predicate
   selects from a list the variable with the smallest lower bound. Numbers
   are treated as if they were variables with singleton domains.

<P>

<H3>Fail Conditions</H3>
   Fails if List is empty.


<H3>Resatisfiable</H3>
   No.
<H2>Examples</H2>
<PRE>
   start_time_labeling([]) :- !.
   start_time_labeling(Vars) :-
        deletemin(X, Vars, Rest),
	indomain(X),
	start_time_labeling(Rest).



</PRE>
<H2>See Also</H2>
<A HREF="../../lib/fd/deleteff-3.html">deleteff / 3</A>, <A HREF="../../lib/fd/deleteffc-3.html">deleteffc / 3</A>, <A HREF="../../lib/fd/indomain-1.html">indomain / 1</A>, <A HREF="../../lib/fd/labeling-1.html">labeling / 1</A>
</BODY></HTML>
